package com.lzy.system.organization.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lzy.exception.BusException;
import com.lzy.system.organization.dto.SysNavAddDTO;
import com.lzy.system.organization.dto.SysNavSortDTO;
import com.lzy.system.organization.dto.convert.SysNavUpdateDTO;
import com.lzy.system.organization.entity.SysNav;
import com.lzy.system.organization.vo.SysNavUserVo;

import java.util.List;

/**
 * <p>
 * 导航菜单 服务类
 * </p>
 *
 * @author lcc
 * @since 2023-12-05
 */
public interface ISysNavService extends IService<SysNav> {
    /**
     * 查询所有的导航
     * @return
     * @throws BusException
     */
    public List<SysNav> getList() throws BusException;

    /**
     * 查询用户所有的导航
     * @param userId
     * @return
     * @throws BusException
     */
    public List<SysNavUserVo> getListUserNav(String userId) throws BusException;
    /**
     * 新增
     * @param dto
     * @return
     * @throws BusException
     */
    public boolean add(SysNavAddDTO dto) throws BusException;

    /**
     * 修改信息
     * @param dto
     * @return
     * @throws BusException
     */
    public boolean update(SysNavUpdateDTO dto) throws BusException;

    /**
     * 根据id删除
     * @param id
     * @return
     * @throws BusException
     */
    public boolean delById(long id) throws BusException;
    /**
     * 批量删除
     * @param list
     * @return
     * @throws BusException
     */
    public boolean delBatch(List<Integer> list) throws BusException;

    /**
     * 保存排序
     * @param list
     * @return
     * @throws BusException
     */
    public boolean saveOrder(List<SysNavSortDTO> list) throws BusException;
}
